package com.ap.core.validation.message.rules;

import com.ap.core.common.types.MessageStatus;
import com.ap.core.cxf.jaxb.managepayment.RetrieveRTPMessageType;
import com.ap.core.message.info.RequestMessageInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.RTPOriginalInfo;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Ranjit.Singh
 */
public class SV0001Rule extends AbstractValidationRule<MessageValidationInfo<RequestMessageInfo<RetrieveRTPMessageType>, RTPOriginalInfo>> {


    @Override
    public boolean validate(MessageValidationInfo<RequestMessageInfo<RetrieveRTPMessageType>, RTPOriginalInfo> infoObject) {
    		 return infoObject.getOriginalInfo().isOrderPaymentExists(MessageStatus.AWAITING_RETRIEVAL);
    }


}
